package com.googlecode.adaboost.classifier;

import com.googlecode.adaboost.trainer.DataElement;

public abstract class BinaryWeakClassifier implements WeakClassifier {

	/*
	 * The Trainer will set this value
	 */
	protected double alpha;

	public final void setAlpha(double alpha) {
		this.alpha = alpha;
	}

	public final double getAlpha() {
		return alpha;
	}

	@Override
	public final double getRate(DataElement data) {
		return alpha * makeDecision(data);
	}

}
